use tokio::time::{sleep, Duration};

async fn task_1() {
    println!("Task 1 started");
    sleep(Duration::from_secs(2)).await;
    println!("Task 1 finished");
}

async fn task_2() {
    println!("Task 2 started");
    sleep(Duration::from_secs(1)).await;
    println!("Task 2 finished");
}

#[tokio::main]
fn main() {
    tokio::spawn(task_1());
    tokio::spawn(task_2());
    sleep(Duration::from_secs(3)).await;
}

